package game.objects.staticObjects;

import engine.game.Manager;
import engine.graphics.Color4f;
import engine.graphics.TextureManager;
import engine.graphics.Vertex2f;
import engine.objects.ContainerObject;

public class Background extends ContainerObject {

	private static final long serialVersionUID = 1L;
	
	public Background(Manager m, int x, int y, int w, int h) {
		super(m, x, y, w, h);
	}
	
	@Override
	public void init() {
		this.changeColor(new Color4f(1,1,1,1));
	}
	
	protected void texture(int w, int h, int l, int t, String name){
		this.subdivide(w, h, name, "backgrounds",
			new Vertex2f[]{new Vertex2f(l, t)});
	}

	public void render(){
		if(this.isTextured())
			TextureManager.bindTexture("backgrounds"); 
		super.render(); 
	}


}
